package dfbz.demo.demo07;

public class Test {
    public static void main(String[] args) {
        Person p = getPerson();
        p.show();

//        Student s = new Student("admin");
        Teacher s = new Teacher("admin");
        runShow(s);
    }

    //返回一个人  是学生？老师？
    public static Person getPerson() {
//        Student s=new Student("admin");
        Teacher s = new Teacher("admin");
        return s;
    }

    public static void runShow(Person p) {
        p.show();
    }
}
